package com.design.controller.sensor;

import com.design.model.BaseResult;
import com.design.model.ReportRequest;
import com.design.service.ShippingRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@Api(tags = "【传感器端-数据上报】")
@RequestMapping("/sensor")
@CrossOrigin(origins = "*")
public class ShoppingRecordCheckController {

    @Autowired
    private ShippingRecordService service;

    @ApiOperation(value = "偏载信息-数据上报")
    @PostMapping("/report")
    public BaseResult<Void> report(@RequestBody ReportRequest request) {
        service.report(request);
        return new BaseResult<>();
    }
}
